one more test and some refactoring
a few more tests and a fixed iff/if function
refactorization of the first test
major simplification