public void move(int speed){
        //assumed that the move is done within one unit of time, by which speed is specified
        System.out.println(getPosition());
        if(speed==0){
            timeToMove=inertia;
            return;
        }
        if(timeToMove>0){
            timeToMove-=1;
        } else {
            setPosition(position-speed); //position is subtracted to go to 0, which means the vehicle leaves the lane
        }
        notifyLane(belongTo);
        System.out.println(getPosition());
    }