reduce k and put unrolling back in for reduction