refactor tooltip for better control