Weighing the side effects of drugs