- changed all range calls to xrange