code reformat to make more uniform