clean up resolve logic using collections.Iterable