program for the server side