fixed profileCtrl to work with promises