store preferences in cookies