Working version - Now you can set cookie or storage