Initial non working port to python