refactor set total
remove unneeded functions from previous non class structure.
Handle no max number being passed