unshorten URL logic