added alarm functionality - all working