reorginze code