added in if there is going to be a remainder. to the problem