adding new function of parsing upgrade state