reform the code