This is the core concept of making simple pagination