Added preference function
Added preference function