added more detailed docs to alrm
added more detailed docs to alrm
added some extra coments and docs