now calculate_speed.py works quickly