Updated code in 1.3.1 for answer 7