added p7 solution