move string modifications into a refinement. Now we have annoying experimental msg though...