more intelligent placement of tooltip