working version of server.
Tests are passed.