13-stencil refactor