re-fractor the entire system to MVC