heartbeat and removekey now work