Adding pageSize method and getBuckets method in directory