added opt code