made deletion for loops go high to low