add serialization to and from string for TernaryPattern
resolve merge conflicts
edit git ignore file