implemented cond macro