Update with support for python 2 input