Added if binding. I think I introduced some bugs, but I don't know where 'cause the tests pass