[SD System] optimize code