remove unnecessary length check, slices are magic