Finished problem 6 in 4 lines