added constructor to xrange