Switched to paginator and edited copy/pasted code