periodic boundary condition