sinatra working with db