I have found only one solution about optimalisation, but what I nedd is as much as possible simple solution.