working on client side code