add distance to prototype selection