new version from stian
update with latest code