fixes and to_python method added