some rationalizations of the code