clean up data structure