Update and rename subfunction 8 to subfunction 7