Changed range to xrange