restructuring on client side