prepareCallback