added pylookup mode