tidy dispaching in a new class.