correct variable usage for array_pop