DRYer code