reorganize to accommodate the generator better