public static Event createEvent(Timestamp s, Timestamp e, int duration, int numslots, String location, String supervisor, String title){ 
        try {
            Connection con = DB.getConnection();
            PreparedStatement ps = con.prepareStatement(CREATEEVENT, Statement.RETURN_GENERATED_KEYS);
            ps.setTimestamp(1, s);
            ps.setTimestamp(2, e);
            ps.setInt(3, duration);
            ps.setInt(4, numslots);
            ps.setString(5, location);
            ps.setString(6, supervisor);
            ps.setString(7, title);
            int result = ps.executeUpdate();
            ResultSet res = ps.getGeneratedKeys();
            if(res.next()){
                return new Event(res.getInt(1), s, e, duration, numslots, location, supervisor, title);
            }            
        } catch(Exception ex){ }
        return null;
    }