bottleneck class coded in C++