Match coding conventions to reduce code

hook method in the controller instead