Added periodic bc
Added caratung