also take care of cookie method