replaced var.__str__() with str(var):