preparations for by_ref call model