more work on c++ fragment code