added (not yet functioning) duplicate elimination