applying MVC design for threadviewcontroller