modify payload and other variables