Added table indexby and difference functions