added check for payload