update code, need to check the root