refactored the server and ready to start working with the client side code
added server-side freezing