make a little DRYer