Some code for the server