make it a wee bit DRYer