updating preferences