refactor and improve geo based search