Added very simple pagination support