add #set_heartbeat() and #get_heartbeat() methods