solutions for 7, 8, template for 9