new server+client side logic