Create subfunction 3