added template loader