Replaced xrange with range