some typos: + error for rewriting rules phases