with server and client side