DRYing code a little bit.