new "indt" function, bug somewhere