1st version of the solution to p07