changed run function so it will except a set of shingles which will represent one document