general nice code, a few tips though: the variable %b isnt needed, you can just paste that into %c. Also (and this is something to keep in mind) dont double VAR a variable (this also means, dont use VAR in a loop). declare all the vars in the beginning like:
var %comma = $1, %c
and dont use any more var commands
anyway good work