adding r371 from http://code.google.com/p/numishare/