trying to get next to work across all versions of python