adding loadModel and model option
improved text parsing