fix tests
refactor