got rid of dim[] array, fscanf assigns directly to structure elements