first version of Purifier

should work, but not well tested