trying but failed to break up code chuncks

The "new" version is at the end, all commented