adding scope.apply