labeled the apply function