started breaking up massFunctions method