modularize generators