WIP: modifying code to use controller
WIP: using MVC