Moved new python code in