refactored to parsePayload() behavior