started moving functionality into home controller for pagination