incorporate some of d\'s suggestions