fix tests (ready for review)