converting into MVC Frameworks