reform the structure of this program