Baseline code with alarm feature