refactor tooltip