adding initial python version of sim codes