replacing xrange for py33 compilance