clean the code and update the style