add directive pagination