added a loop to python shell