Replace xrange with range