updated client side flow