Part7 solution