rewrite code

rewrite code