protected boolean addAppointment(Appointment a) {
        if (appointmentList.isEmpty() == false) {
            boolean canAdd = true;
            for (Appointment app : appointmentList) {
                if (app.getPeriod().intersectionWith(a.getPeriod()) != null) {
                    canAdd = false;
                }
            }
            if(canAdd == true){
                appointmentList.add(a);
                return  true;
            } else {
                return false;
            }
        }
        else
        {
            appointmentList.add(a);
            return true;
        }
    }