added code for problem 97
added code for problem 79
added code for problem 58