modify fn.cookie function