move helper functions into the shinyServer environment