docs: function (rect, filter) {
  			var keys = HashMap.key(rect, keyHolder ),
  			i, j,k,
  			results = [];
  
  			if (filter === undefined) filter = true; //default filter to true
  
  			//search in all x buckets
  			for (i = keys.x1; i <= keys.x2; i++) {
  				//insert into all y buckets
  				for (j = keys.y1; j <= keys.y2; j++) {
  					cell = this.map[(i << 16)^j];
  					if (cell) {
                          for (k = 0; k<cell.length; k++)
                              results.push(cell[k])
  					}	
  				}
  			}
  
  			if (filter) {
  				var obj, id, finalresult = [], found = {};
  				//add unique elements to lookup table with the entity ID as unique key
  				for (i = 0, l = results.length; i < l; i++) {
  					obj = results[i];
  					if (!obj) continue; //skip if deleted
  					id = obj[0]; //unique ID
  
  					//check if not added to hash and that actually intersects
  					if (!found[id] && obj.x < rect._x + rect._w && obj._x + obj._w > rect._x &&
  								 obj.y < rect._y + rect._h && obj._h + obj._y > rect._y)
  						found[id] = results[i];
  				}
  
  				//loop over lookup table and copy to final array
  				for (obj in found) finalresult.push(found[obj]);
  
  				return finalresult;
  			} else {
  				return results;
  			}
  		}