removed new_from_str because it is unsecure as a copy of the string remains in stack