public BeanIndexer<K> remove(K element) {
	if (elements.remove(element)) {
	    if (beanEvent != null) {
		try {
		    beanEvent.removeListener(element, getListener());
		} catch (InvocationTargetException ex) {
		    throw new RuntimeException(ex.getCause());
		}
	    }

	    for (Entry<String, Map<Object, Set<K>>> e : index.entrySet()) {
		for (Object value : retrievePropertyValueAsCollection(
			e.getKey(), element)) {
                    Set<K> elementSet = e.getValue().get(value);
                    if (elementSet != null) {//if no more element exists for the given index value 
                                             //or element has been modified after indexing is done
                        elementSet.remove(element);
                        if (elementSet.isEmpty()) {
                            e.getValue().remove(value);
                        }
                    }
		}
	    }
	}
	return this;
    }