fixed tr error, now uses safer quoted rather than parenthesised set definition