treat first outside elem as array's list end
revert array's list logic to use last elem as end marker