implemented periodic boundary conditions and getter
Added setter for Grid class