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))
diff --git a/R/utils.R b/R/utils.R
new file mode 100644
index 0000000..2d7de47
--- /dev/null
+++ b/R/utils.R
@@ -0,0 +1,6 @@
+# function to lookup reveal resource
+reveal_resources <- function(...) {
+  system.file("rmarkdown/templates/revealjs_presentation/resources",
+              ...,
+              package = "revealjs")
+}
\ No newline at end of file