reformat code to be more readable