make stats box self-adjusting depending on text contents