Small abstract rewrite