modified loader to allow parameter passing to model constructors