Add generics and iterator