Chapter 12: Added pagination