part way cpp impl