add controller and views logic