initialize $ann and $ref with keys