updating to MVC style