first milestone: BD working for periodic boundary conditions