adding equals and hash methods to TextLeaf