updated add fnction model