add preferences functions