changed position of template loader