attempt at MVC architecture