Separate subfunction.