rewriting semi-complete