Added changes to basic_detector.py