first rewriting and condensing