change implementation fromcontroller to view