location suggestion bug fixed and refactor