saving state on tooltip refactor