added helper functions for sinatra.rb
Wrote #update method in sinatra.rb
updated tests