added some stuff I maybe shouldn't have to alg 3, and working on an algorithm (4) to compare element lists before building the selectors