minor adjustments and simplifications