reorganization of code.  2 new files