moving getLocations() to bottom.