add get_preferences method.
refactoring