change assign_by_ref to just assign