changed d to rotated round, changed algorithm for e, f, t (see comment), changed v from mono-weight to contrast