changed preferences from string to integer