Optimization:less memory copys