started to implement internal c++ api