Corrected functions in problem 61