implemented self assignment