updated periodic boundaries