minor adjustments to function and wording