A generalization of a growth model with endogenous fertility