Effective removal of pharmaceuticals from wastewater