Modified the mvc controller