refactor: more DRYness