Reverted to Python 2 functionality