moved functions
client side working trivial test