working on prepareData