finalize model api