work toward moving control to c++ library