prototype: track prefixes correctly