move the payload decoding to another method where i can then add sanitization
using flags to determine which type of process should be started