DRYing that up a bit.