organize code as MVC