should swap the loop and with here