finishes flatten
adds dict init