lookup.py modified