fixed undeclared methods and changed to use index_object