example of a best practice: removing the $scope from within a method.  makes it more testable