add comments and fix bug in upgrade_center with python3