Pick loop code