please adjust the previous code's indentation, and make it follow the code conventions