moving backgeoloc from controller to factory