Figured out looping issue