update the slice() method