Fixed ToDo: use #slice to make code indent clear

Fixed this `TODO` task, so now the code is more explicit on about its doing. Output is still the same & all test pass.