Added limit on loop_through