added helper functions to model_load