split code into pieces