clean up and reorganize