new method to reset alarm and write a method to get recent alarm.