Cookie caculate method update.