updated shiny code