public V put(K key, V value) {

        searchElement(key);

        // Previous value associated with the key
        V previousValue = null;

        if (_searchHolder == null) {

            // Create the bucket sub-array if there is none
            if (buckets.getElement(_searchBucketIndex) == null) {
                buckets.setElement(_searchBucketIndex, new Array<KeyValueHolder<K, V>>(0));
            }

            // Add new holder with the new key-value pair
            buckets.getElement(_searchBucketIndex).append(new KeyValueHolder<K, V>(key, value));

            // Count the new entry
            ++loadCounter;

            if (loadCounter / primes[capacityIndex] >= loadFactor) {
                rescale(++capacityIndex);
            }


        } else {

            // Change value in the found holder
            previousValue = _searchHolder.value;
            _searchHolder.value = value;
        }

        return previousValue;
    }