improving WebUI Sample