format the code,fix reference error