initial checkins.  a lot of this code is just xferred from a different project