moved .then() to service from controller.