code reformat and import optimization