Adding pagination that actually works