add Heartbeat.hs from smaccmpilot codebase