add main.rb and modify sinatra functionality