rewrite the whole project