organize the code
update