creating contextRef dict