added reusable tooltip function