moving data presentation logic out of server.rb