adding periodic box support.