made the refCounter declaration lazy and consistent with data source example