working with cyclic boundaries and source term