max queuelength implemented