change reason to bytes