change tr method to return string even if no changes are made