added tools.py, contains func to select visit