N2 loop working, some energy testings with different boundary conditions