basic implementation of a MVC pattern