First working version of the new approach