fixes, tests
before merge
after