Changed all extra_payload queries to a function call in order to change extra_payload for each packet