code migrated to shiny_0.10.0