Added separate controller for the pagination