modify class of python and test sucessful in console