better handling of preferences