the code should be on the server too