updates preferences