some edits from Mark's comments