added init flag to model constructor