public Object put(Object key, Object value) {
		// return old value with the same key, or return null if new key
		int key_index = Math.abs(key.hashCode() % capacity);
		if (array[key_index] == null) {
			array[key_index] = new Entry(key, value);
			this.size++;
			if ((double) size / capacity >= load_factor) {
				resize();
			}
			return null;
		} else {
			Entry head = array[key_index];
			while (head != null && !head.key.equals(key)) {
				head = head.next;
			}
			if (head == null) {
				Entry to_add = new Entry(key, value);
				to_add.next = array[key_index];
				array[key_index] = to_add;
				this.size++;
				if ((double) size / capacity >= load_factor) {
					resize();
				}
				return null;
			} else {
				// which means there is an entry in the hashmap that has the
				// same key as the new element
				// so we have to replace the old value
				Object old_value = head.value;
				head.value = value;
				return old_value;
			}
		}
	}