Implemented the new version of getSlice. Testing has to be performed on
the method.