fixed the decreasing looping