cleaning up data structure