minor adjustments to code'