modified format, and reduced useless file, delect duplicate code