updated PurityHelper