added keepAlive feature