updates template loading script