started converting to python