added close() to fromString() too