delegation to smaller functions