clear and update some code