removing timeout
using frozenset() instead of set()