added paginate, fix scope, fix buttons