generic assignment operator