use correct number of elements in assignment