insert(item) {
		let index = -1;

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

			if (index !== -1) {
				this.nodes[index].insert(item);
				return;
			}
		}

		this.objects.push(item);

		if (
			this.objects.length > this.max_objects &&
			this.level < this.max_levels
		) {
			//split if we don't already have subnodes
			if (this.nodes.length === 0) {
				this.split();
			}

			let i = 0;

			//add all objects to there corresponding subnodes
			while (i < this.objects.length) {
				index = this.getIndex(this.objects[i]);

				if (index !== -1) {
					this.nodes[index].insert(this.objects.splice(i, 1)[0]);
				} else {
					i = i + 1;
				}
			}
		}
	}
Insert the given object into the node. If the node
exceeds the capacity, it will split and add all
objects to their corresponding subnodes.
@param {object} item - object to be added