convert text to model