improve API for tooltip