fixed legacy alarm code to work with new style guide