fixed bugwriting meds script