revised model loading code