in the middle of the ArrayQueue implementation