minimal fixes ;) - should work now - semi automatic :))