Added keepAlive implementation