a little refactor in mapActivity