Added fucntionality for alarm to sustain itself.