populate pre with ajax call