controller for register