changed to MVC framework