queue with array growing/shrinking works