added loading gif when making ajax call