Text this: Generalization of the Carothers equation for linear step growth polymers