added Haz and IfElse metafunctions