added line for knight's move and backward function (inverse dtm)