enhance looping flow