model creation code updated. v 1.0