reorganize the code that counts compact self avoiding walks on the 2d lattice