created function for tooltip