shift_i and pop_i are very simple