implemented MVC structure