Initial version of python code