added if-else output medicine handler