Added detache method
Adapted heartbeat