add long polling support