add update and refractor