rewrote code without suffix copying, performance became worse