added methods in location.rb