updated to MVC structure