Updated my functions so they work in problem 5