modified dispatch implementation;