Added beginning of Dij.