changed the method of gathering location