refactoring to enable external tooltip integration