code review from Ian Lance Taylor