changes based on review by peterbe