reorgnize code.