reprogrammed input for python 2