clean and reformat code