refine UI behavior