separate generation and lib