Changed from str cmp to set contains. Much faster!