further revisions based on PR feedback and Rubocop runs