used setattr instead of __dict__ but results are the same