code: function getIndex(objects, obj) {
  
              var i;
              for (i = 0; i < objects.length; i++) {
                  if (objects[i] === obj) {
                      return i;
                  }
              }
  
              return -1;
          }
docs: returns the index of the given object in the
  given objects array, -1 if not contained
  only needed for cyclic logic