try saving doc reference instead of href