fixed typo in slices function