Discovery may lead to safer drinking water, cheaper medicine