added loading script function by defer attribute