set up a tooltip function