integrating view and controller