implemented the if(clause,ontrue,onfalse) pseudo-function