debugged to account for moving topo