engine optimize all codes