add cog in set_payload, make set_tcp only accept a list as argument