replaced more collects with join logic, still a couple that I could not change and pass tests???