added data slicing functions