public Object remove(Object key) {
		// return the value of the key to be removed
		// or return null if key not existed in the map
		int key_index = Math.abs(key.hashCode() % capacity);
		if (array[key_index] == null) {
			return null;
		} else {
			Entry head = array[key_index];
			while (head != null && !head.key.equals(key)) {
				head = head.next;
			}
			if (head == null) {
				return null;
			} else {
				Object value = head.value;
				Entry next = head.next;
				if (next == null) {
					head = null;
					size--;
				} else {
					head.key = next.key;
					head.value = next.value;
					head.next = next.next;
					size--;
				}
				return value;
			}
		}
	}