a few improvements in string methods