public V put(K key, V value) {
        V oldvalue = get(key);
        if (oldvalue != null) {
            values[currentIndex] = value;
            return oldvalue;
        }
        checkEnoughCapacity(1);
        keys[currentSize] = key;
        values[currentSize] = value;
        currentSize++;
        return null;
    }