initial work on c++ wrapper