refactoring
more tests