modified location script