implemented printing of flags in tooltip