proper MVC implementation