An improved economic growth model with endogenous fertility