assignment operator optimization