private static Event extractEvent(ResultSet result) throws Exception{
        int id = result.getInt("id");
        Timestamp startTime = result.getTimestamp("startTime");
        Timestamp endTime = result.getTimestamp("endTime");
        int duration = result.getInt("duration");
        int numslots = result.getInt("numslots");
        String location = result.getString("location");
        String supervisor = result.getString("supervisor");
        String title= result.getString("title");
        Event event = new Event(id, startTime, endTime, duration, numslots, location, supervisor, title);
        return event;        
    }