formatter and generator