converted to python
started conversion to python