add keepalive mode