implemented remote $ref loading