Refactor resource finder function
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index 8e429c3..4e9a736 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -91,21 +91,12 @@
                                   md_extensions = NULL,
                                   ...) {
   
-  # function to lookup reveal resource
-  reveal_resources <- function() {
-    system.file("rmarkdown/templates/revealjs_presentation/resources",
-                package = "revealjs")
-  }
-  
   # base pandoc options for all reveal.js output
   args <- c()
   
   # template path and assets
   if (identical(template, "default")) {
-    default_template <- system.file(
-      "rmarkdown/templates/revealjs_presentation/resources/default.html",
-      package = "revealjs"
-    )
+    default_template <- reveal_resources("default.html")
     args <- c(args, "--template", pandoc_path_arg(default_template))
   } else if (!is.null(template)) {
     args <- c(args, "--template", pandoc_path_arg(template))