add cond test for alarm