Added code for server