reorg the code into a separate directory