added code for MVC

added code for MVC