c++ implementation in progress