refinements based on adamralph's comments