updated significance test code