refactor payload structure