Baseline code with Alarm feature