refactored code, added assigned list, implemented assignment of alarms