Adding solutions for 1.6, 1.7 and 1.8.