small change to alarm code