Updated SDM driving function