first 'working' version, but very limited tests so far