reformat; code analyze errors fixed