refactoring measure_preference handling