added to/from string methods and tests for them