use the get_alarm function instead of direct file read