improv tpltostr function