rearranged client side