add cookie library original code