Use sets for doing repeated lookups faster
Merge pull request #5 from moshekaplan/patch-1

Use sets for doing repeated lookups faster