helper implemented for make it DRYer