factor out  location.rb