added solutions for 6 and 7