reorganize and clean up