paralelizing d requires lock in some places;
paralelizing d requires local sl();