Optimization code2 #350