some useful methods for sinatra framework