purify code