update to sqRootMod to return a value in the function