more tests
more tests and if statements refactoring