sync

sync BuildFromModel code