improved the code structure for the 25pt-const stencil