changed to generator based refreshing