rewrite the code dstyle