added .trim() to remove surrounding whitespace

Addresses issue #722