added sanitization to client side