refactoring alarm adapter and alarms helper