copying Bernard's stuff, as per Jenny's recommendation