wrote locator.m, need to modify it to read from file