added affects of periodic boundary conditions