wrapper rewrite complete