changed tester to test error as a function of M