Added finitedatasetiterator
switch working