refactor appLocation