little refactoring
more tests