clean up of prepare data