a bit modified dispatcher