initial import from revision 2785