DRYing things up a little