change range to xrange