scaling and adding restart
added opt case