commented code, speed up location history search