added some checking to meds; not tested