add cookies func