moved pager stuff from view to controller