maybe replace all instances of range added in the PR with xrange