solving a small bug and adding figures to stop detector