Changing range into xrange