further tweaking
some rewrites