please help me use /function with NBT

i have command in check.mcfunction: $execute at @e[type=marker,nbt={data: {type: "receiver", freq: $(data.freq)}}] run setblock ~ ~ ~ dirt which is called from tick.mcfunction: execute as @e[type=marker,nbt={data:{type:receiver}}] run function swr:check with entity @s for some reason, check.mcfunction isn't working, as it's not displayed in the game. i've tested it a bit, and i'm pretty sure its problem is the $(data.freq). From my understanding, function calls that use with can use an NBT tag as a macro using NBT paths. It apparently seems i'm using the command wrong, though, so i went to the wiki for help but the wiki states: > Macro functions can also harness stored NBT data using the with instruction that may follow the function name. The argument succeeding with must specify a NBT source (a block, entity, or command storage) followed by the NBT path of a compound tag. > For example: > execute as @p run function foo:bar2 with entity @s SelectedItem > And the function foo:bar2 is: > $say The player running this function is holding $(count) items with ID $(id)! which, at least to me, is the same as what i wrote. the wiki provides no more info. what am i doing wrong here?
Continue to help post