Added assignment function