add model base code