1st version of the solution ot p09