move validating controller to own class