adds logic to sinatra app