add fromString method to support direct string input