added some swift change on mode