finish heartbeat first version