added second alarm function