use cookie to store setting