added $scope to correct pass in scope to controllers