change functions to set alarm