Rewriting the code