updated place finding algorithm