restructered to MVC