this is an unrelated refactor that can be split into its own commit