moved loader to separate template for smooth rendering