Rewrite some part of code