removed unnecessary factory
generator can now be different for each target