public boolean loadCalendar(String filename) {
        BufferedReader bis = null;
        try {
            try {
                // open file
                bis = new BufferedReader(new FileReader(filename));
                String s=null;
                s = bis.readLine();
                //while we still have events to read
                while (s != null) {
                    Event ev;
                    String name=null,loc=null,desc=null;
                    Date start=null,end=null;
                    Repetition rep=null;
                    Reminder rem=null;
                    //String categories=null;
                    //Time startTime=null,endTime=null;
                    //repetition,reminder

                    name=bis.readLine();
                    loc = bis.readLine();
                    desc = bis.readLine();
                    //date has '/' as a delimiter
                    Scanner sc = new Scanner(bis.readLine());
                    sc = sc.useDelimiter("/");
                    start = new Date(sc.nextInt(),
                                     sc.nextInt(),sc.nextInt());
                    sc = new Scanner(bis.readLine());
                    sc = sc.useDelimiter("/");
                    end = new Date(sc.nextInt(),
                                   sc.nextInt(),sc.nextInt());
                    sc = new Scanner(bis.readLine());
                    if(sc.hasNextInt())
                        rep = new Repetition("",sc.nextInt());
                    else rep = new Repetition(sc.next(),sc.nextInt());
                    sc = new Scanner(bis.readLine());
                    sc = sc.useDelimiter("[/|:]");
                    rem = new Reminder(new Date(sc.nextInt(),
                                                sc.nextInt(),
                                                sc.nextInt()),
                                       new Time(sc.nextInt(),
                                                sc.nextInt()));
                    //push event
                    ev = new Event(name,loc,desc,start,end,rep,rem);
                    this.events.push(ev);
                    
                    //read delimiters
                    bis.readLine();
                    s = bis.readLine();
                
                }
                bis.close();
                return true;

                // in case the file does not exist, create it
            } catch (FileNotFoundException e) {
                System.err.println("File not found, "+
                                   "creating file ...");
                FileOutputStream out;
                PrintStream p;
                try {
                    out = new FileOutputStream(filename);
                    p = new PrintStream(out);
                    p.close();
                    out.close();
                    return true;
                } catch (Exception e2) {
                    System.err.println ("Error "+
                                        "writing file: "+
                                        e2.getStackTrace());
                    return false;
                }
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
        return false;
    }