rewrite code
update