minor change to helper function