model and script finish