modifying afk display datapack

so im using this modified afk display datapack, but on my server i recently added two teams a "Hot" and a "Cold" team, each player is assigned to be on one team or neither, but the afk display datapack im using adds a player to a seperate afk team and when they become non-afk they lose their assigned team, is there a way to modify the datapack so it reassigns them to their previously set team?

Continue to help post