set model data function seperate from build stage