wtf - i managed to mix up array_shift and array_pop