Added code to detect intersections and depending on if we want to turn or go straight the robot will perform the required operations