DRYing things up a bit