added support for keep alive