added logic for niceText