add cond and tests