public double getMaxTime (){
        double maxTime = 0;
        for(int i = 0; i<time.length; i++){
            if(time[i]>maxTime)
                maxTime = time[i];
        }
        return maxTime;
    }