add some functions on client side