added alarm functionalities.