modified controller and add model