added paginate and authorization