added sinatra functionality