improved tooltip code readability