Function not needed on $scope level