for use in shiny app