final changes to function

run test on math for the function worksheet.