converting into a sinatra app