added pagination to pin index