Implemented heartbeat