working from ui.r, not from server.r