adding view logic and controller to manage