a few more tests and a fixed iff/if function