nasty iterator working