reworked server.rb