add fb generation, refactor