working paginator without render method