added terminating old models code