modified armGetActiveAlarm function