Update subfunction 6