Use $n instead of $k, to be consistent with later usage, and don't quote the tag, just the value.