combining the two lines into one for problem10