Added pagination to pin_index