Started working on the python code - this is very rough and should be checked out by nobody