anchor.diff:                  top: $("#containsfloats").outerHeight(true) + 2*shadowHeight,
                   left: ($(window).width() - $(elem).outerWidth(true) - 2*shadowHeight) * Math.random() + shadowHeight
               });
  -            elemTopCoords[id] = $(elem).offset().top;
  -            if (collide(elem, id)){
  +            //Problem with undefined elem
  +            elemTopCoords[elems.indexOf(elem)] = $(elem).offset().top;
  +            if (collide(elem)){
                   //move it out of the way first before trying to display again
                   $(elem).css({
                       left: -$(elem).width() * 2,
                   })
                   setTimeout(function() {
  -                    loop(elem, id);
  -                }, 2000)
  +                    loop(elem);
  +                }, Math.random() * 1000)
               }
               else {
                   //add box shadow
  
positive.code:         var apiLoadMore;
          var elems;
          var elemTopCoords = [];
          function loop(elem, id) {
              var r = Math.floor(Math.random()*128)+128;
              var g = Math.floor(Math.random()*128)+128;
              var b = Math.floor(Math.random()*128)+128;
  
negative.code:                     easing: "linear",
                      step: function(){
                          //records value
                          elemTopCoords[elems.indexOf(elem)] = $(elem).offset().top;
                      },
                      complete: function(){          
                          //records value
                          elemTopCoords[elems.indexOf(elem)] = $(elem).offset().top;
                          $(elem).css({
                              left: -$(elem).width() * 2,
                          })
  
                          //delete element and its div, update elemTopCoords
                          //elemTopCoords.splice(elems.indexOf(elem), 1); prob colliding?
                          //$(elem).remove();
  
                          completedCount ++;
                          //if completed is 6 (10-4) less than total posts, loadMore
                          if (completedCount % 10 == 4){
                              apiLoadMore.loadMore();
                          }
                      }
                  });
  
  
              }
          }
  
          //from Jason Arnello on TeamTreehouse
          function objToArray (obj) {
              var values = [];
  
              obj.each (function() {
                  values.push($(this));
              });
  
              return values;
          }
  
          //adding new divs to existing moving ones on loadMore
          //note: 9gag loadmore always gets 10 more posts
          function moveNewDivs(){
              //elems = document.getElementsByClassName("content"); 
              elems = objToArray($(".content"));
              (function iterate(i) {
                  console.log(i);
                  setTimeout(function () {
                      loop(elems[i]);
                      if (i < elems.length-1) iterate(i+1);
                  }, Math.random() * 1000)
              })(elems.length - 10);
  
          }
  
  
          function collide(elem){
              //adds padding for minimum space between divs
              var padding = 60 + 4*shadowHeight;
              var x1 = $(elem).offset().left - padding/2;
              var y1 = elemTopCoords[elems.indexOf(elem)] - padding/2;
              var h1 = $(elem).outerHeight(true);
              var w1 = $(elem).outerWidth(true);
              var yEnd1 = y1 + h1 + padding;
              var xEnd1 = x1 + w1 + padding;
              for (var i = 0; i < elems.length; i ++){
                  if (elem !== elems[i]){
                      var x2 = $(elems[i]).offset().left;
                      var y2 = elemTopCoords[i];
                      var h2 = $(elems[i]).outerHeight(true);
  