First working (on provided xml) version :-)