added paginate variable