add new purify method