updated prob320, might not be fully right but it's a 2x speedup