the second version, with sinatra