removes unsound cases, adds unrolling