refine format and add UT cases