diff --git a/R/add_indent.R b/R/add_indent.R
index 8d79160..7f0a0e3 100644
--- a/R/add_indent.R
+++ b/R/add_indent.R
@@ -3,13 +3,14 @@
 #' @param kable_input Output of `knitr::kable()` with `format` specified
 #' @param positions A vector of numeric row numbers for the rows that need to
 #' be indented.
+#' @param level_of_indent a numeric value for the indent level
 #'
 #' @examples x <- knitr::kable(head(mtcars), "html")
 #' # Add indentations to the 2nd & 4th row
-#' add_indent(x, c(2, 4))
+#' add_indent(x, c(2, 4), level_of_indent = 1)
 #'
 #' @export
-add_indent <- function(kable_input, positions, no_of_indent) {
+add_indent <- function(kable_input, positions, level_of_indent) {
   if (!is.numeric(positions)) {
     stop("Positions can only take numeric row numbers (excluding header rows).")
   }
@@ -21,18 +22,18 @@
     return(kable_input)
   }
   if (kable_format == "html") {
-    return(add_indent_html(kable_input, positions, no_of_indent))
+    return(add_indent_html(kable_input, positions, level_of_indent))
   }
   if (kable_format == "latex") {
-    return(add_indent_latex(kable_input, positions, no_of_indent))
+    return(add_indent_latex(kable_input, positions, level_of_indent))
   }
 }
 
 # Add indentation for LaTeX
-add_indent_latex <- function(kable_input, positions, no_of_indent) {
+add_indent_latex <- function(kable_input, positions, level_of_indent) {
   table_info <- magic_mirror(kable_input)
   out <- solve_enc(kable_input)
-  no_of_indent<-as.numeric(no_of_indent)
+  level_of_indent<-as.numeric(level_of_indent)
 
 
   if (table_info$duplicated_rows) {
@@ -63,13 +64,13 @@
 }
 
 latex_indent_unit <- function(rowtext) {
-  paste0("\\\\hspace\\{",no_of_indent,"em\\}", rowtext)
+  paste0("\\\\hspace\\{",level_of_indent,"em\\}", rowtext)
 }
 
 
 
 # Add indentation for HTML
-add_indent_html <- function(kable_input, positions, no_of_indent) {
+add_indent_html <- function(kable_input, positions, level_of_indent) {
   kable_attrs <- attributes(kable_input)
 
   kable_xml <- read_kable_as_xml(kable_input)
@@ -85,7 +86,7 @@
     node_to_edit <- xml_child(xml_children(kable_tbody)[[i]], 1)
     if (!xml_has_attr(node_to_edit, "indentlevel")) {
       xml_attr(node_to_edit, "style") <- paste(
-        xml_attr(node_to_edit, "style"), "padding-left: ",paste0(no_of_indent*2,"em;")
+        xml_attr(node_to_edit, "style"), "padding-left: ",paste0(level_of_indent*2,"em;")
       )
       xml_attr(node_to_edit, "indentlevel") <- 1
     } else {
