clean up and reorganization