Added some missing lines from C++ code;  Needs revision & compare of
code