Modified the controller