fix routing issue

Extract this one-off class to a class declaration.