correcting dwtest