add cookie method