Added onheartbeat