refactor `[0..x.length - 1]` >> `[0...x.length]`