started the complete rewrite