implemented queue dispatcher