better parsing of model files