its faster to loop through via for loop without using pop