version one for global relabelling and dynamically changing the size of the in-out queue