client side data cleaning