format and reorder
improve java doc