functoins move to helper