simplify
new rev of changes + tests