simple long polling script