working demo with additional filtering of empty  iterations