Changed xrange to range