Add function to slice train/test