moves post generation into dedicated class