benchmark code working for subset of data