DRYing something