refactored with Sinatra::Base approach and added config.ru