move document reference inside ready