Refactor of `fetch_payload` function.
Refactor of `fetch_payload` function.

massimo-nocentini/competitive-programming,massimo-nocentini/competitive-programming,massimo-nocentini/competitive-programming,massimo-nocentini/competitive-programming,massimo-nocentini/competitive-programming