slicing with xs solves the memory problem