Added xrange implementation