refactor with named functions
changed to MVC