Currently, the initialize method requires a dictionary of values and positions to be passed where the values are used as keys. This means that any two positions that share the same value cannot be passed to the routine, as the keys will clash. Internally it appears there is nothing that prevents this change from happening as the positions/values are eventually stored as arrays anyway. Ideally, initialize should accept an array of dictionaries instead, such that positions that share the same value do not clash.