changes after @cummingsm's review