added maxsize in queue