seperate data and index