added some functionality for locating points and keeping the top viewport