add of function getLocation in AppController