Added pagination to plugin