adding James' python script