Using splice instead of pop, has some advantages