added functionality to server.rb, all tests passed