changed pool to loop