created a method for the set up of the alarm
updating