added longpolling to th fetch method
rebuilt for new API