adding the quick find algorithm