some refactoring and completed centos upgrade scenario