fixed problem with immutable string in python, added to_string method