retrieve(item, fn) {
		let returnObjects = this.objects;

		//if we have subnodes ...
		if (this.nodes.length > 0) {
			const index = this.getIndex(item);

			//if rect fits into a subnode ..
			if (index !== -1) {
				returnObjects = returnObjects.concat(this.nodes[index].retrieve(item));
			} else {
				//if rect does not fit into a subnode, check it against all subnodes
				for (let i = 0; i < this.nodes.length; i = i + 1) {
					returnObjects = returnObjects.concat(this.nodes[i].retrieve(item));
				}
			}
		}

		if (typeof fn === "function") {
			returnObjects.sort(fn);
		}

		return returnObjects;
	}
Return all objects that could collide with the given object
@param {object} item - object to be checked against
@param {object} [fn] - a sorting function for the returned array
@returns {object[]} array with all detected objects