added alarm tests and expanded rules and conditions